package main

import (
	"context"
	"gitee.com/dennis-mxx/gcode-cache/mbolt"
	"gitee.com/dennis-mxx/gcode-cache/mcache"
	"gitee.com/dennis-mxx/gcode-common/mcore"
	"gitee.com/dennis-mxx/gcode-common/mlogger"
)

func main() {
	ctx := context.Background()
	defer ctx.Done()
	mbolt.InitDefaultBolt("./bolt.cache", "username", "password")

	cacheable := mcache.InitCache2WithBlot(mbolt.Default, "username", ctx, mlogger.DefaultTraceLogger())
	cacheable.Set("123", "123ccc")
	data := mcore.Watch(cacheable.Get("123"))
	println(data)

}
